import React, {Component} from 'react';
import { Menu } from 'antd';
import {Link} from "react-router-dom";
import flowchart from './soure/flowchart.png';
import {inject, observer} from "mobx-react";

const { SubMenu } = Menu;
@inject('user')
@observer

class Commodity extends Component {
    state = {
        current: 'mail',
    };

    handleClick = e => {
        console.log('click ', e);
        this.setState({ current: e.key });
    };

    render() {
        const { current } = this.state;
        return (
            <div>
                <Menu onClick={this.handleClick} selectedKeys={[current]} mode="horizontal">
                    <Menu.Item key="one">
                        <Link to={'/index/purchasereturn'}>采购退货</Link>
                    </Menu.Item>
                    <Menu.Item key="two">
                        <Link to={'/index/goodsDownMaterial'}>商品拆料</Link>

                    </Menu.Item>
                    <Menu.Item key="three">
                        <Link to={'/index/goodsWarehousing'}>商品入库</Link>

                    </Menu.Item>
                    <Menu.Item key="four">
                        <Link to={'/index/inventorystatistics'}>库存统计</Link>
                    </Menu.Item>
                    <Menu.Item key="five">
                        <Link to={'/index/commoditywarehousing'}>固定编码入库</Link>
                    </Menu.Item>
                    <Menu.Item key="six">
                        <Link to={'/index/distributiondelivery'}>配货出库</Link>
                    </Menu.Item>
                    <Menu.Item key="seven">
                        <Link to={'/index/storeSeturn'}>门店退货</Link>
                    </Menu.Item>
                    <Menu.Item key="ten">
                        <Link to={'/index/storesAllocating'}>门店调拨</Link>
                    </Menu.Item>
                </Menu>
                <div>
                    <img src={flowchart} alt="flowchart" />
                </div>
            </div>
        );
    }
}

export default Commodity;